#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
float average(float array[], int n)
{
	int i;
	float aver, sum = 0;
	for (i = 0; i < n; i++)
	{
		sum += array[i];
	}
	aver = sum / n;
	return aver;
}
int main()
{
	float average(float array[], int n);
	float height[100], aver;
	int i, n;
	printf("Input the number of students:\n");
	scanf("%d", &n);
	printf("Input the heights of students:\n");
	for (i = 0; i < n; i++)
	{
		scanf("%f", &height[i]);
	}
	printf("\n");
	aver = average(height, n);
	printf("The average height is:%.2f\n", aver);
	return 0;
}